/**
 * @description 列表分页工具
 */
const pageSizeList = ({ data = [], pageSize = 10, current = 1 }) => {


    let result = [];
    for (var i = (current - 1) * pageSize; i < current * pageSize; i++) {
        if (i >= data.length) {
            break;
        } else {
            result.push(data[i]);
        }
    }

    return result;
}

module.exports = pageSizeList;